import request from '../utils/axios/request'

export default {
  config() {
    return request.get('/configs')
  },
  articleList(params) {
    return request.get('/articles', params)
  },
  articleHot() {
    return request.get('/articlesHot')
  },
  articleNew() {
    return request.get('/articlesNew')
  },
  articleLabel() {
    return request.get('/labels')
  },
  articleSearch() {
    return request.get('/articlesSearch')
  },
  articleCategory(id, params) {
    return request.get('/category/' + id, params)
  },
  commentNew() {
    return request.get('/commentsNew')
  },
  articleInfo(id) {
    return request.get('/articles/' + id)
  },
  categoryList(params) {
    return request.get('/category', params)
  },
  commentList(params) {
    return request.get('/comments', params)
  },
  linkList() {
    return request.get('/links')
  },
  linksApplyList() {
    return request.get('/linksApply')
  },
  linksApplyStatus() {
    return request.get('/linksApplyStatus')
  },
  commentsCreate(params) {
    return request.post({
      url: '/comments',
      data: params
    })
  },
  linkCreate(params) {
    return request.post({
      url: '/links',
      data: params
    })
  },
  visitCreate(params) {
    return request.post({
      url: '/visits',
      data: params
    })
  },
  login(params) {
    return request.post({
      url: '/login',
      data: params
    })
  },
}
